﻿// Decompiled with JetBrains decompiler
// Type: Microsoft.InfoCards.TokenFactoryFactory
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 8E14765A-6610-409A-BA36-099A0642905D
// Assembly location: E:\git\ALLIDA\windll\infocard.exe

using System.Net;
using System.ServiceModel.Description;

namespace Microsoft.InfoCards
{
  internal sealed class TokenFactoryFactory
  {
    private TokenFactoryFactory()
    {
    }

    public static ITokenFactory Create(
      InfoCard infoCard,
      TokenCreationParameter parameter,
      ServiceEndpoint endPoint,
      IWebProxy proxy)
    {
      return !infoCard.IsSelfIssued ? (ITokenFactory) new RemoteTokenFactory(endPoint, proxy) : (ITokenFactory) new SelfIssuedSamlTokenFactory();
    }
  }
}
